/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.aliyuncs.edas.model.v20170801;

import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.edas.transform.v20170801.DescribeApplicationScalingRulesResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;

/**
 * @author auto create
 * @version 
 */
public class DescribeApplicationScalingRulesResponse extends AcsResponse {

	private Integer code;

	private String message;

	private String requestId;

	private AppScalingRules appScalingRules;

	public Integer getCode() {
		return this.code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMessage() {
		return this.message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getRequestId() {
		return this.requestId;
	}

	public void setRequestId(String requestId) {
		this.requestId = requestId;
	}

	public AppScalingRules getAppScalingRules() {
		return this.appScalingRules;
	}

	public void setAppScalingRules(AppScalingRules appScalingRules) {
		this.appScalingRules = appScalingRules;
	}

	public static class AppScalingRules {

		private Integer currentPage;

		private Integer pageSize;

		private Long totalSize;

		private List<Rule> result;

		public Integer getCurrentPage() {
			return this.currentPage;
		}

		public void setCurrentPage(Integer currentPage) {
			this.currentPage = currentPage;
		}

		public Integer getPageSize() {
			return this.pageSize;
		}

		public void setPageSize(Integer pageSize) {
			this.pageSize = pageSize;
		}

		public Long getTotalSize() {
			return this.totalSize;
		}

		public void setTotalSize(Long totalSize) {
			this.totalSize = totalSize;
		}

		public List<Rule> getResult() {
			return this.result;
		}

		public void setResult(List<Rule> result) {
			this.result = result;
		}

		public static class Rule {

			private Long updateTime;

			private Long createTime;

			private String appId;

			private Long lastDisableTime;

			private Integer maxReplicas;

			private Boolean scaleRuleEnabled;

			private String scaleRuleType;

			private Integer minReplicas;

			private String scaleRuleName;

			private Metric metric;

			private Trigger trigger;

			private Behaviour behaviour;

			public Long getUpdateTime() {
				return this.updateTime;
			}

			public void setUpdateTime(Long updateTime) {
				this.updateTime = updateTime;
			}

			public Long getCreateTime() {
				return this.createTime;
			}

			public void setCreateTime(Long createTime) {
				this.createTime = createTime;
			}

			public String getAppId() {
				return this.appId;
			}

			public void setAppId(String appId) {
				this.appId = appId;
			}

			public Long getLastDisableTime() {
				return this.lastDisableTime;
			}

			public void setLastDisableTime(Long lastDisableTime) {
				this.lastDisableTime = lastDisableTime;
			}

			public Integer getMaxReplicas() {
				return this.maxReplicas;
			}

			public void setMaxReplicas(Integer maxReplicas) {
				this.maxReplicas = maxReplicas;
			}

			public Boolean getScaleRuleEnabled() {
				return this.scaleRuleEnabled;
			}

			public void setScaleRuleEnabled(Boolean scaleRuleEnabled) {
				this.scaleRuleEnabled = scaleRuleEnabled;
			}

			public String getScaleRuleType() {
				return this.scaleRuleType;
			}

			public void setScaleRuleType(String scaleRuleType) {
				this.scaleRuleType = scaleRuleType;
			}

			public Integer getMinReplicas() {
				return this.minReplicas;
			}

			public void setMinReplicas(Integer minReplicas) {
				this.minReplicas = minReplicas;
			}

			public String getScaleRuleName() {
				return this.scaleRuleName;
			}

			public void setScaleRuleName(String scaleRuleName) {
				this.scaleRuleName = scaleRuleName;
			}

			public Metric getMetric() {
				return this.metric;
			}

			public void setMetric(Metric metric) {
				this.metric = metric;
			}

			public Trigger getTrigger() {
				return this.trigger;
			}

			public void setTrigger(Trigger trigger) {
				this.trigger = trigger;
			}

			public Behaviour getBehaviour() {
				return this.behaviour;
			}

			public void setBehaviour(Behaviour behaviour) {
				this.behaviour = behaviour;
			}

			public static class Metric {

				private Integer minReplicas;

				private Integer maxReplicas;

				private List<Metric1> metrics;

				public Integer getMinReplicas() {
					return this.minReplicas;
				}

				public void setMinReplicas(Integer minReplicas) {
					this.minReplicas = minReplicas;
				}

				public Integer getMaxReplicas() {
					return this.maxReplicas;
				}

				public void setMaxReplicas(Integer maxReplicas) {
					this.maxReplicas = maxReplicas;
				}

				public List<Metric1> getMetrics() {
					return this.metrics;
				}

				public void setMetrics(List<Metric1> metrics) {
					this.metrics = metrics;
				}

				public static class Metric1 {

					private Integer metricTargetAverageUtilization;

					private String metricType;

					public Integer getMetricTargetAverageUtilization() {
						return this.metricTargetAverageUtilization;
					}

					public void setMetricTargetAverageUtilization(Integer metricTargetAverageUtilization) {
						this.metricTargetAverageUtilization = metricTargetAverageUtilization;
					}

					public String getMetricType() {
						return this.metricType;
					}

					public void setMetricType(String metricType) {
						this.metricType = metricType;
					}
				}
			}

			public static class Trigger {

				private Integer minReplicas;

				private Integer maxReplicas;

				private List<Trigger2> triggers;

				public Integer getMinReplicas() {
					return this.minReplicas;
				}

				public void setMinReplicas(Integer minReplicas) {
					this.minReplicas = minReplicas;
				}

				public Integer getMaxReplicas() {
					return this.maxReplicas;
				}

				public void setMaxReplicas(Integer maxReplicas) {
					this.maxReplicas = maxReplicas;
				}

				public List<Trigger2> getTriggers() {
					return this.triggers;
				}

				public void setTriggers(List<Trigger2> triggers) {
					this.triggers = triggers;
				}

				public static class Trigger2 {

					private String type;

					private String metaData;

					private String name;

					public String getType() {
						return this.type;
					}

					public void setType(String type) {
						this.type = type;
					}

					public String getMetaData() {
						return this.metaData;
					}

					public void setMetaData(String metaData) {
						this.metaData = metaData;
					}

					public String getName() {
						return this.name;
					}

					public void setName(String name) {
						this.name = name;
					}
				}
			}

			public static class Behaviour {

				private ScaleUp scaleUp;

				private ScaleDown scaleDown;

				public ScaleUp getScaleUp() {
					return this.scaleUp;
				}

				public void setScaleUp(ScaleUp scaleUp) {
					this.scaleUp = scaleUp;
				}

				public ScaleDown getScaleDown() {
					return this.scaleDown;
				}

				public void setScaleDown(ScaleDown scaleDown) {
					this.scaleDown = scaleDown;
				}

				public static class ScaleUp {

					private Integer stabilizationWindowSeconds;

					private String selectPolicy;

					private List<Policy> policies;

					public Integer getStabilizationWindowSeconds() {
						return this.stabilizationWindowSeconds;
					}

					public void setStabilizationWindowSeconds(Integer stabilizationWindowSeconds) {
						this.stabilizationWindowSeconds = stabilizationWindowSeconds;
					}

					public String getSelectPolicy() {
						return this.selectPolicy;
					}

					public void setSelectPolicy(String selectPolicy) {
						this.selectPolicy = selectPolicy;
					}

					public List<Policy> getPolicies() {
						return this.policies;
					}

					public void setPolicies(List<Policy> policies) {
						this.policies = policies;
					}

					public static class Policy {

						private Integer periodSeconds;

						private String type;

						private String value;

						public Integer getPeriodSeconds() {
							return this.periodSeconds;
						}

						public void setPeriodSeconds(Integer periodSeconds) {
							this.periodSeconds = periodSeconds;
						}

						public String getType() {
							return this.type;
						}

						public void setType(String type) {
							this.type = type;
						}

						public String getValue() {
							return this.value;
						}

						public void setValue(String value) {
							this.value = value;
						}
					}
				}

				public static class ScaleDown {

					private Integer stabilizationWindowSeconds;

					private String selectPolicy;

					private List<Policy4> policies3;

					public Integer getStabilizationWindowSeconds() {
						return this.stabilizationWindowSeconds;
					}

					public void setStabilizationWindowSeconds(Integer stabilizationWindowSeconds) {
						this.stabilizationWindowSeconds = stabilizationWindowSeconds;
					}

					public String getSelectPolicy() {
						return this.selectPolicy;
					}

					public void setSelectPolicy(String selectPolicy) {
						this.selectPolicy = selectPolicy;
					}

					public List<Policy4> getPolicies3() {
						return this.policies3;
					}

					public void setPolicies3(List<Policy4> policies3) {
						this.policies3 = policies3;
					}

					public static class Policy4 {

						private Integer periodSeconds;

						private String type;

						private String value;

						public Integer getPeriodSeconds() {
							return this.periodSeconds;
						}

						public void setPeriodSeconds(Integer periodSeconds) {
							this.periodSeconds = periodSeconds;
						}

						public String getType() {
							return this.type;
						}

						public void setType(String type) {
							this.type = type;
						}

						public String getValue() {
							return this.value;
						}

						public void setValue(String value) {
							this.value = value;
						}
					}
				}
			}
		}
	}

	@Override
	public DescribeApplicationScalingRulesResponse getInstance(UnmarshallerContext context) {
		return	DescribeApplicationScalingRulesResponseUnmarshaller.unmarshall(this, context);
	}

	@Override
	public boolean checkShowJsonItemName() {
		return false;
	}
}
